package com.itheima.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 售货机类型表
 * @TableName tb_vm_type
 */
@TableName(value ="tb_vm_type")
@Data
public class VmType implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer typeId;

    /**
     * 行数
     */
    private Integer vmRow;

    /**
     * 列数
     */
    private Integer vmCol;

    /**
     * 类型名
     */
    private String name;

    /**
     * 货道最大容量
     */
    private Integer channelMaxCapacity;

    /**
     * 型号
     */
    private String model;

    /**
     * 
     */
    private String image;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        VmType other = (VmType) that;
        return (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getVmRow() == null ? other.getVmRow() == null : this.getVmRow().equals(other.getVmRow()))
            && (this.getVmCol() == null ? other.getVmCol() == null : this.getVmCol().equals(other.getVmCol()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getChannelMaxCapacity() == null ? other.getChannelMaxCapacity() == null : this.getChannelMaxCapacity().equals(other.getChannelMaxCapacity()))
            && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getVmRow() == null) ? 0 : getVmRow().hashCode());
        result = prime * result + ((getVmCol() == null) ? 0 : getVmCol().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getChannelMaxCapacity() == null) ? 0 : getChannelMaxCapacity().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", typeId=").append(typeId);
        sb.append(", vmRow=").append(vmRow);
        sb.append(", vmCol=").append(vmCol);
        sb.append(", name=").append(name);
        sb.append(", channelMaxCapacity=").append(channelMaxCapacity);
        sb.append(", model=").append(model);
        sb.append(", image=").append(image);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}